package com.woniuxy.carlife.carlifeuserweb.controller;


import com.woniuxy.carlife.carlifecommonsweb.exception.CarlifeGlobalException;
import com.woniuxy.carlife.carlifecommonsweb.responsetemplate.Result;
import com.woniuxy.carlife.carlifecommonsweb.responsetemplate.StatusCode;
import com.woniuxy.carlife.carlifecommonsweb.util.CopyUtil;
import com.woniuxy.carlife.carlifeusermodel.dto.ProvinceDto;
import com.woniuxy.carlife.carlifeuserweb.entity.Province;
import com.woniuxy.carlife.carlifeuserweb.service.ProvinceService;
import com.woniuxy.carlife.carlifeuserweb.util.StatusMessageEnum;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author zjq
 * @ClassName:ProvinceController
 * @Description:省
 * @date 2021/4/6 20:02
 **/

//@RestController
//@Api(tags = "查询省")//用于描述接口类的相关信息，作用于类上
//@RequestMapping("/province")
public class ProvinceController {

    @Resource
    ProvinceService provinceService;

//    /*
//     * 功能描述〈查询省〉
//     * @author:zjq
//     * @param:
//     * @return:
//     * @Date 2021/4/12 15:10
//     * @throws
//     */
//    @ApiOperation(value = "查询省")
//
//@GetMapping("/ordinary/findProvince")
//    public Result findProvince()  {
//        List<Province> province = provinceService.findProvince();
//        List<ProvinceDto> provinceList = CopyUtil.getList(province, ProvinceDto.class);
//        return province == null ?
//                new Result(false, StatusCode.ERROR, StatusMessageEnum.QUERY_IS_EMPTY.toString())
//                : new Result(true, StatusCode.OK, StatusMessageEnum.SEARCH_SUCCESSFUL.toString(), provinceList);
//    }

}

